export const network = {
  state: {
    // websocket实例
    ws: null,
    // websocket重连次数
    websocketReconnectNum: 1,
    maxWebsocketReconnectNum: 5
  },
  mutations: {
    // 改变websocket重连次数
    changeWebsocketReconnectNum (state, payload) {
      state.websocketReconnectNum = payload
    },
    changeWsInstance (state, payload) {
      state.ws = payload
      console.log('ws实例', state.ws)
    }
  }
}
